/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mbos.entities;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Farnsbert
 */
@Entity
@Table(name = "system")
public class System implements Serializable {

  private static final long serialVersionUID = 1l;
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "id", nullable = false, unique = true)
  private Integer id;
  @NotNull
  @Column(name = "fiscal_year", nullable = false)
  private Integer fiscalYear;
  @NotNull
  @Column(name = "vat", nullable = false)
  private double vat;
  @NotNull
  @Column(name = "record_stat", nullable = false)
  private int recordStat;//1 is record disabled , 0 is record enabled
  @OneToMany(cascade = CascadeType.ALL, mappedBy = "companyId")
  private Collection<Company> companyCollection;

  public Integer getFiscalYear() {
    return fiscalYear;
  }

  public void setFiscalYear(Integer fiscalYear) {
    this.fiscalYear = fiscalYear;
  }

  public double getVat() {
    return vat;
  }

  public void setVat(double vat) {
    this.vat = vat;
  }

  public int getRecordStat() {
    return recordStat;
  }

  public void setRecordStat(int recordStat) {
    this.recordStat = recordStat;
  }

  public Collection<Company> getCompanyCollection() {
    return companyCollection;
  }

  public void setCompanyCollection(Collection<Company> companyCollection) {
    this.companyCollection = companyCollection;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }
}
